3.693 \(\int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^3 \, dx\)

Optimal. Leaf size=84 \[ \frac{a^3 A c^3 \tan ^5(e+f x)}{5 f}+\frac{2 a^3 A c^3 \tan ^3(e+f x)}{3 f}+\frac{a^3 A c^3 \tan (e+f x)}{f}+\frac{a^3 B c^3 \sec ^6(e+f x)}{6 f} \]

[Out]

(a^3*B*c^3*Sec[e + f*x]^6)/(6*f) + (a^3*A*c^3*Tan[e + f*x])/f + (2*a^3*A*c^3*Tan[e + f*x]^3)/(3*f) + (a^3*A*c^
3*Tan[e + f*x]^5)/(5*f)

________________________________________________________________________________________

Rubi [A]  time = 0.12589, antiderivative size = 84, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 41, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.098, Rules used = {3588, 73, 641, 194} \[ \frac{a^3 A c^3 \tan ^5(e+f x)}{5 f}+\frac{2 a^3 A c^3 \tan ^3(e+f x)}{3 f}+\frac{a^3 A c^3 \tan (e+f x)}{f}+\frac{a^3 B c^3 \sec ^6(e+f x)}{6 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^3,x]

[Out]

(a^3*B*c^3*Sec[e + f*x]^6)/(6*f) + (a^3*A*c^3*Tan[e + f*x])/f + (2*a^3*A*c^3*Tan[e + f*x]^3)/(3*f) + (a^3*A*c^
3*Tan[e + f*x]^5)/(5*f)

Rule 3588

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(a*c)/f, Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x
], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]

Rule 73

Int[((a_) + (b_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[(a*c + b*
d*x^2)^m*(e + f*x)^p, x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[n, m] && Integer
Q[m]

Rule 641

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(e*(a + c*x^2)^(p + 1))/(2*c*(p + 1)),
x] + Dist[d, Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[p, -1]

Rule 194

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^n)^p, x], x] /; FreeQ[{a, b}, x]
&& IGtQ[n, 0] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^3 \, dx &=\frac{(a c) \operatorname{Subst}\left (\int (a+i a x)^2 (A+B x) (c-i c x)^2 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{(a c) \operatorname{Subst}\left (\int (A+B x) \left (a c+a c x^2\right )^2 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{a^3 B c^3 \sec ^6(e+f x)}{6 f}+\frac{(a A c) \operatorname{Subst}\left (\int \left (a c+a c x^2\right )^2 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{a^3 B c^3 \sec ^6(e+f x)}{6 f}+\frac{(a A c) \operatorname{Subst}\left (\int \left (a^2 c^2+2 a^2 c^2 x^2+a^2 c^2 x^4\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{a^3 B c^3 \sec ^6(e+f x)}{6 f}+\frac{a^3 A c^3 \tan (e+f x)}{f}+\frac{2 a^3 A c^3 \tan ^3(e+f x)}{3 f}+\frac{a^3 A c^3 \tan ^5(e+f x)}{5 f}\\ \end{align*}

Mathematica [A]  time = 0.259436, size = 65, normalized size = 0.77 \[ \frac{a^3 A c^3 \left (\frac{1}{5} \tan ^5(e+f x)+\frac{2}{3} \tan ^3(e+f x)+\tan (e+f x)\right )}{f}+\frac{a^3 B c^3 \sec ^6(e+f x)}{6 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^3,x]

[Out]

(a^3*B*c^3*Sec[e + f*x]^6)/(6*f) + (a^3*A*c^3*(Tan[e + f*x] + (2*Tan[e + f*x]^3)/3 + Tan[e + f*x]^5/5))/f

________________________________________________________________________________________

Maple [A]  time = 0.012, size = 75, normalized size = 0.9 \begin{align*}{\frac{{a}^{3}{c}^{3}}{f} \left ({\frac{B \left ( \tan \left ( fx+e \right ) \right ) ^{6}}{6}}+{\frac{A \left ( \tan \left ( fx+e \right ) \right ) ^{5}}{5}}+{\frac{B \left ( \tan \left ( fx+e \right ) \right ) ^{4}}{2}}+{\frac{2\,A \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{3}}+{\frac{B \left ( \tan \left ( fx+e \right ) \right ) ^{2}}{2}}+A\tan \left ( fx+e \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3,x)

[Out]

1/f*a^3*c^3*(1/6*B*tan(f*x+e)^6+1/5*A*tan(f*x+e)^5+1/2*B*tan(f*x+e)^4+2/3*A*tan(f*x+e)^3+1/2*B*tan(f*x+e)^2+A*
tan(f*x+e))

________________________________________________________________________________________

Maxima [A]  time = 1.67341, size = 143, normalized size = 1.7 \begin{align*} \frac{5 \, B a^{3} c^{3} \tan \left (f x + e\right )^{6} + 6 \, A a^{3} c^{3} \tan \left (f x + e\right )^{5} + 15 \, B a^{3} c^{3} \tan \left (f x + e\right )^{4} + 20 \, A a^{3} c^{3} \tan \left (f x + e\right )^{3} + 15 \, B a^{3} c^{3} \tan \left (f x + e\right )^{2} + 30 \, A a^{3} c^{3} \tan \left (f x + e\right )}{30 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3,x, algorithm="maxima")

[Out]

1/30*(5*B*a^3*c^3*tan(f*x + e)^6 + 6*A*a^3*c^3*tan(f*x + e)^5 + 15*B*a^3*c^3*tan(f*x + e)^4 + 20*A*a^3*c^3*tan
(f*x + e)^3 + 15*B*a^3*c^3*tan(f*x + e)^2 + 30*A*a^3*c^3*tan(f*x + e))/f

________________________________________________________________________________________

Fricas [C]  time = 1.35219, size = 420, normalized size = 5. \begin{align*} \frac{{\left (160 i \, A + 160 \, B\right )} a^{3} c^{3} e^{\left (6 i \, f x + 6 i \, e\right )} + 240 i \, A a^{3} c^{3} e^{\left (4 i \, f x + 4 i \, e\right )} + 96 i \, A a^{3} c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 16 i \, A a^{3} c^{3}}{15 \,{\left (f e^{\left (12 i \, f x + 12 i \, e\right )} + 6 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 15 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 20 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 15 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 6 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3,x, algorithm="fricas")

[Out]

1/15*((160*I*A + 160*B)*a^3*c^3*e^(6*I*f*x + 6*I*e) + 240*I*A*a^3*c^3*e^(4*I*f*x + 4*I*e) + 96*I*A*a^3*c^3*e^(
2*I*f*x + 2*I*e) + 16*I*A*a^3*c^3)/(f*e^(12*I*f*x + 12*I*e) + 6*f*e^(10*I*f*x + 10*I*e) + 15*f*e^(8*I*f*x + 8*
I*e) + 20*f*e^(6*I*f*x + 6*I*e) + 15*f*e^(4*I*f*x + 4*I*e) + 6*f*e^(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))**3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 2.64689, size = 1071, normalized size = 12.75 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3,x, algorithm="giac")

[Out]

1/30*(5*B*a^3*c^3*tan(f*x)^6*tan(e)^6 - 30*A*a^3*c^3*tan(f*x)^6*tan(e)^5 - 30*A*a^3*c^3*tan(f*x)^5*tan(e)^6 +
15*B*a^3*c^3*tan(f*x)^6*tan(e)^4 + 15*B*a^3*c^3*tan(f*x)^4*tan(e)^6 - 20*A*a^3*c^3*tan(f*x)^6*tan(e)^3 + 90*A*
a^3*c^3*tan(f*x)^5*tan(e)^4 + 90*A*a^3*c^3*tan(f*x)^4*tan(e)^5 - 20*A*a^3*c^3*tan(f*x)^3*tan(e)^6 + 15*B*a^3*c
^3*tan(f*x)^6*tan(e)^2 + 45*B*a^3*c^3*tan(f*x)^4*tan(e)^4 + 15*B*a^3*c^3*tan(f*x)^2*tan(e)^6 - 6*A*a^3*c^3*tan
(f*x)^6*tan(e) + 30*A*a^3*c^3*tan(f*x)^5*tan(e)^2 - 180*A*a^3*c^3*tan(f*x)^4*tan(e)^3 - 180*A*a^3*c^3*tan(f*x)
^3*tan(e)^4 + 30*A*a^3*c^3*tan(f*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